home *** CD-ROM | disk | FTP | other *** search
/ World of Education / World of Education.iso / world_s / sp12exe.zip / SPELCHEK.DOC < prev    next >
Text File  |  1991-03-28  |  12KB  |  283 lines

  1. SPELCHEK Version 1.2 - A *FAST* spelling checker by Edwin Floyd.  3-28-91
  2.  
  3. Version 1.2 implements a new, faster dictionary algorithm which
  4. is incompatible with previous versions.  Please rebuild all user
  5. dictionaries with MAKEDICT.  SPELCHEK is distributed in three files:
  6.  
  7.    SP12EXE.ZIP - Executable programs
  8.    SP12DCT.ZIP - Dictionaries (large file)
  9.    SP12SRC.ZIP - TP6.0 source code to all programs
  10.  
  11. Purpose of SPELCHEK
  12. -------------------
  13. SPELCHEK extracts words from an input file, or several input files,
  14. and checks them for membership in a superimposed code dictionary.
  15. Any words not found in the dictionary, it writes to an output file,
  16. one per line.  The program recognizes a number of options for:
  17.  
  18.   o High-order bit stripping
  19.  
  20.   o Appending additional information to the output word list
  21.  
  22.   o Defining the characters comprising a "word"
  23.  
  24. How to run SPELCHEK
  25. -------------------
  26. From the DOS command line enter:
  27.  
  28.   SPELCHEK filenames [-H] [-M] [-W[+/-]abc..] [@name] [-Uname]
  29.            [-Oname] [-Ppath]
  30.  
  31. Spaces delimit command line parameters.  You may intermingle
  32. input text filenames and options (mark each option with a leading
  33. hyphen).  Filenames may include wild-cards.  Some options (-W,-O,-U)
  34. allow a character string or filename to follow the option letter.
  35. This must follow with no intervening spaces or the program will
  36. mistake it for an input file name.  Some options (-H,-M) allow a "+"
  37. or "-" to indicate "on" or "off".  This also must follow with no
  38. intervening space, and "+" is assumed if it is omitted.  You may
  39. place options and filenames in an ASCII "include" file and
  40. specify its name with a leading "@" on the command line.  An
  41. include file may contain references to other include files.  You
  42. also may specify default options, filenames and include files in
  43. the DOS environment using "SET SPELCHEK=...".  For example:
  44.  
  45.   SET SPELCHEK=-H+ -Owords.out -W-ABCDEFGHIJKLMNOPQRSTUVWXYZ
  46.   SET WORDS=@defaults.spc -O
  47.  
  48. SPELCHEK processes options left-to-right, first from the DOS
  49. environment, then from the command line.  Where options conflict,
  50. the last option processed prevails.  Thus, you may override "SET"
  51. environment options on the command line.
  52.  
  53. What the options mean
  54. ---------------------
  55. -H[+/-]  Clear the high-order bit on each input character
  56.          (default off).  Use this option to process files
  57.          created by word processing programs, like WordStar,
  58.          that mark some letters by setting the high-order
  59.          bit, often at the beginning or end of a word.
  60.  
  61. -M[+/-]  Append markup information to output word list.  This
  62.          causes the program to insert a number in front of each
  63.          word written to the output file.  The number indicates
  64.          the byte position in the input where the offending word
  65.          begins.  The first byte in the input file is position 1.
  66.          Also, the program writes the file name at the beginning
  67.          of the word list for each input file.  The file name is
  68.          preceded by a zero and a space.  This output file is
  69.          intended as input to a program such as MARKDOC which
  70.          marks misspelled words in the input document.
  71.  
  72. -P[path] Indicate the drive and directory containing the
  73.          master dictionary files.  There are seven master
  74.          dictionary files: AB.DCT, CD.DCT, EH.DCT, IN.DCT,
  75.          OR.DCT, ST.DCT and UZ.DCT.  They all must reside
  76.          in the same directory.  If no -P path is specified,
  77.          the master dictionary files must reside in the current
  78.          directory or the program directory.  The master dictionary
  79.          files were created with MAKEDICT (see below) from a list
  80.          of over a hundred thousand words obtained from from Public
  81.          Brand Software, 1-800-IBM-DISK.
  82.  
  83. -U[name] Name a user dictionary file.  This option specifies the
  84.          name of an existential dictionary file produced by the
  85.          MAKEDICT program.  You may specify the drive and full path.
  86.          If a simple file name is specified, the file is assumed to
  87.          be in the current directory.  If SPELCHEK can't open the
  88.          user dictionary, it issues a warning message and processes
  89.          the input files against the master dictionaries only.
  90.  
  91. -W-abc.. Replace the "word character set" with the indicated
  92.          characters.  The program checks each character in
  93.          each input file for membership in the word character
  94.          set and defines a "word" as an uninterrupted
  95.          sequence of at least one but no more than 255
  96.          characters which are members of that set.  The
  97.          default is the set of upper and lower case
  98.          alphabetic characters.
  99.  
  100. -W+abc.. Add additional characters to the word character set.
  101.  
  102. -O[name] Name the output file.  If the name is omitted ("-O "),
  103.          output goes to "StdOut" and is available for DOS a
  104.          pipe (|) or redirection (>).  StdOut is the
  105.          default.
  106.  
  107. -O-      Suppress output.  -Onul also suppresses output.  The
  108.          program will still display word counts on the
  109.          screen.
  110.  
  111. Three examples
  112. --------------
  113. 1. Generate list of all misspelled words in the document named
  114. MYSTORY.DOC and write the list to file MYSTORY.BWD. The following
  115. are equivalent:
  116.  
  117.   SPELCHEK mystory.doc -Omystory.bwd
  118.  
  119.   SPELCHEK mystory.doc >mystory.bwd  (default StdOut)
  120.  
  121.   SET SPELCHEK=-Omystory.bwd         (set defaults)
  122.   SPELCHEK mystory.doc
  123.  
  124.   If at this point we want an alphabetic, un-duplicated list of misspelled
  125.   words, we can use the WORDS program (see WORDS.DOC for other uses):
  126.  
  127.   WORDS mystory.bwd -omystory.unq -a
  128.  
  129. 2. Generate list of misspelled words in the documents named
  130. HISPHYS.WS and OPREPORT.WS and use the list as input for MARKDOC to
  131. mark misspelled words in both documents.  The files are WordStar
  132. documents and we wish to check a user dictionary called MEDTERM.DCT
  133. in the current directory.  The main dictionary files reside in
  134. directory: D:\SPELL.
  135.  
  136.   SET SPELCHEK=-Pd:\spell -H -O -M -Umedterm.dct
  137.   SPELCHEK hisphys.ws opreport.ws | MARKDOC
  138.  
  139. We could have specified all the options on the command line.
  140. Ordinarily you should set the -P and -U options in the environment.
  141.  
  142. 3. Generate an alphabetized, unduplicated list of misspelled words in
  143. all the documents in the C:\SPDOC directory.  Dictionaries and
  144. parameters are as in example two.
  145.  
  146.   SET SPELCHEK=-Pd:\spell -H -O -M -Umedterm.dct
  147.   SPELCHEK c:\spdoc\*.doc -ospelchek.bwd
  148.   WORDS spelchek.out -ounique.bwd -a
  149.  
  150. File UNIQUE.BWD now contains the alphabetized list of unique, misspelled
  151. words from all *.DOC files in the directory.
  152.  
  153. Networks
  154. --------
  155. FYI, network users, SPELCHEK opens its input files in "Read, Deny
  156. None" mode, @include files "Read, Compatibility", and the output
  157. file in "Write, Compatibility".  Only one input file at a time is
  158. open, except during processing of nested @include files.
  159.  
  160. MAKEDICT
  161. --------
  162. MAKEDICT creates an optimal existential dictionary (Bloom filter) which
  163. can be used by SPELCHEK with the "-U" option (see above).  From the DOS
  164. command line, enter:
  165.  
  166.   MAKEDICT infile [bits] [extra]
  167.  
  168. The input file should be a list of words, one per line.  All
  169. characters should be upper case if the dictionary is intended
  170. for use with SPELCHEK.  The second parameter, "bits", specifies
  171. the number of bits to superimpose for each input word.  The
  172. number of bits partly determines the accuracy of the dictionary.
  173. For use with SPELCHEK, specify the default, 14 bits.  The third
  174. parameter, "extra", specifies an allowance of extra space so words
  175. may be added to the dictionary and it still remain within the
  176. accuracy specified by the "bits" parameter.  The default is zero.
  177. The output file is given the same name as the input file, except
  178. the extension is ".DCT".  If the input file extension is ".DCT",
  179. the output file is given the extension ".DIC".
  180.  
  181. To create a user dictionary for SPELCHEK, only the input file need
  182. be specified.  The defaults for "bits" and "extra" are exactly what
  183. is required for a user dictionary.  Example:
  184.  
  185.   MAKEDICT medterm.lst
  186.  
  187. This creates a user dictionary called: MEDTERM.DCT suitable for use
  188. by SPELCHEK.
  189.  
  190. MAKEDICT prints dictionary statistics, including the odds against
  191. incorrectly recognizing a word which is not in the dictionary.  Please
  192. remember, a Bloom filter is a probabilistic technique; collisions are
  193. possible, but you control the collision probability by the bits setting.
  194. All main dictionaries were created with 14 bits, corresponding to about
  195. a 1/16384 chance of collision.  When you specify a user dictionary, the
  196. odds increase to 1/16384 plus the user dictionary odds.  Thus, a 14-bit
  197. user dictionary would increase the odds of a collision to about 1/8192.
  198. This means, on the average, SPELCHEK will miss about one out of every
  199. 8192 different misspelled words.  For instance, if a really bad speller
  200. misspells (differently) about every tenth word in an 80,000-word
  201. document, SPELCHEK may miss one of the misspellings.
  202.  
  203. MARKDOC
  204. -------
  205. MARKDOC reads the output file produced by SPELCHEK with the -M+
  206. option and marks misspelled words in the input files.  From the
  207. DOS command line, enter:
  208.  
  209.   MARKDOC [markchars] [<infile]
  210.  
  211. MARKDOC reads its standard input file (STDIN).  Each input line
  212. begins with a number.  The number zero is always followed by a
  213. document file name.  Each non-zero number indicates the position
  214. of the first character of a misspelled word in the current
  215. document file.  MARKDOC reads each document file and writes an
  216. output file which is the same as the input file, except each
  217. misspelled word is preceded by "mark" characters.  The
  218. default mark character is a single "#", but you may specify
  219. mark characters as a parameter on the command line.  Examples:
  220.  
  221.   SPELCHEK document.fil -M+ | MARKDOC %@
  222.  
  223.   SPELCHEK -M+ document.fil -Omark.$$$
  224.   MARKDOC <mark.$$$
  225.  
  226. MARKDOC saves a copy of the document file under the same name
  227. as the original document except with the extension ".BAK".
  228.  
  229. Note: MARKDOC expects to read a file produced by SPELCHEK with the
  230. -M+ option.  If this option is not set, MARKDOC will abort with a
  231. Pascal error 106.  MARKDOC is intended as a demonstration of one
  232. use of the -M+ output file.  Its crash resistance should be
  233. improved before it's let out into the real world.
  234.  
  235. WORDS
  236. -----
  237. WORDS is a word extractor program useful for creating word lists for
  238. MAKEDICT, among other things.  See WORDS.DOC for documentation.
  239.  
  240. Legal Stuff
  241. -----------
  242. SPELCHEK.EXE, MAKEDICT.EXE, MARKDOC.EXE, WORDS.EXE, SPELCHEK.DOC,
  243. and WORDS.DOC and all source code files, dictionaries, and word
  244. lists are:
  245.  
  246. Copyright (c) 1990,91 by Edwin T. Floyd,
  247. All rights reserved.
  248.  
  249. SPELCHEK is copyrighted "free" software.  The author hereby
  250. expressly permits and encourages individuals to use SPELCHEK at
  251. home and at work and to distribute it without charge.  The author
  252. prohibits distribution of SPELCHEK for profit, or as a part of a
  253. product sold for profit, except where explicit written permission
  254. has been obtained from the author for such distribution.  Also,
  255. users groups and shareware libraries charging a disk duplication
  256. fee not exceeding $10.00 may distribute SPELCHEK.
  257.  
  258. The author makes no warranties of any kind, either expressed or
  259. implied, as to mercantability or fitness for any particular
  260. purpose.  SPELCHEK, et. al., are available as is and in no event
  261. will the author be held liable for damages, including any lost
  262. profits or incidental or consequential damages, even if the author
  263. has been advised of the possibility of such damages.
  264.  
  265. Authorship
  266. ----------
  267. SPELCHEK was written in Turbo Pascal v6.0 by:
  268.  
  269.   Edwin T. Floyd         [76067,747]  (CompuServe)
  270.   #9 Adams Park Court    404/576-3305 (work)
  271.   Columbus, GA 31909     404/322-0076 (home)
  272.  
  273. The latest version of SPELCHEK is available on CompuServe in
  274. the IBMAPP forum, and on a number of bulletin boards around the
  275. country.
  276. - Edwin -                                                 3-28-91
  277.  
  278. Revision History
  279. ----------------
  280. 05-13-90 V1.0 ETF Original release & DDJ submission.
  281. 01-10-91 V1.1 ETF Test version, Bloom filter CRC algorithm (not released)
  282. 03-28-91 V1.2 ETF Update for TP6.0 and second public release
  283.